SET(LIBRARY_OUTPUT_PATH ${EXECUTABLE_OUTPUT_PATH})

FILE(GLOB TINKERCELL_CORE_HDRS *.h)

FILE(GLOB TINKERCELL_CORE_SRC *.cpp)

QT4_WRAP_CPP( TINKERCELL_CORE_MOC ${TINKERCELL_CORE_HDRS} )

ADD_DEFINITIONS(${QT_DEFINITIONS})
ADD_DEFINITIONS(-DQT_PLUGIN)
ADD_DEFINITIONS(-DQT_NO_DEBUG)
ADD_DEFINITIONS(-DQT_SHARED)

ADD_LIBRARY( myTinkerCellCore
  SHARED
  ${TINKERCELL_CORE_MOC}
  ${TINKERCELL_CORE_SRC}
)

TARGET_LINK_LIBRARIES( myTinkerCellCore
  myTinkerCellCore
  muparser
  ${QT_LIBRARIES}
)

IF( WIN32 )
  INSTALL(TARGETS myTinkerCellCore
    DESTINATION bin/../
  )
ELSE( WIN32 )
  INSTALL(TARGETS myTinkerCellCore
    LIBRARY DESTINATION bin/../
  )
ENDIF( WIN32 )
